<!DOCTYPE html>
<html>
	<head>
		<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0;">
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<meta name="apple-mobile-web-app-status-bar-style" content="black" />
		<meta name="format-detection" content="telephone=no" />
			<title>MagApp</title>
		<link rel="stylesheet" type="text/css" media="screen, projection" href="css/styles-backbone.css" />
		<script type="text/javascript" src="js/jbackbone-mobile.js"></script>
	</head>
	<script type="text/javascript">
		document.addEventListener("DOMContentLoaded", function () {
			var config = {
				pages:[			
					'sample-menu.html', 
					'sample-menu2.html', 
					'sample-page1.html',	
					'sample-page2.html', 
					'sample-page3.html',
					'sample-page4.html',
					'sample-subpage-l1.html',	
					'sample-subpage-l2.html'
				],
				MENU_MARGIN: 0
			};					

	    	/** Track all page initialisation **/
			jbackbone.addPageInitListener(function(newPage){
				console.log('Page was initialised: '+newPage);
			},'sample-menu');

	    	jbackbone.init(config);

			/** Track all page changes change **/
			jbackbone.addPageChangeListener(function(oldPage,newPage){
				console.log('Page changed from '+oldPage+' to '+newPage);
			});
			/** Track specific page change **/
			jbackbone.addPageChangeListener(function(oldPage,newPage){
				console.log('Special page is here!');
			},'sample-menu');	

		}, false);

	</script>
	<body>
		<div id="binder">						
			<div id="slider"></div>
			</div>
		</div>
	</body>
</html>	